package edu.hawaii.halealohacli.jcev.command;

import org.wattdepot.client.WattDepotClient;

/**
 * Defines the required functions for the commands in the hale-aloha-cli-jcev system.
 * Implementing classes should use a default constructor and instantiate fields when the execute
 * method is run when the arguments are known.  If a non-default constructor is required please 
 * contact the project owners as described in section 4.0 of the DeveloperGuide to verify
 * (http://code.google.com/p/hale-aloha-cli-jcev/wiki/DeveloperGuide).
 * @author Christopher Foo
 *
 */
public interface Command {
  
  /**
   * Verifies the arguments, executes the command, and prints the results to the screen.
   * @param args Space delimited string of arguments (i.e. "arg1 arg2 arg3").
   * @param client The WattDepot client that will be performing the queries.
   * @throws Exception If an exception was thrown by the command (i.e. bad arguments)
   * or any of its function calls.
   */
  public void execute(String args, WattDepotClient client) throws Exception; 
  
  /**
   * Returns the string to be printed by the help command.
   * Format:
   * "command-name [args1] [args2] .... \nDescription"
   * @return The string to be printed by the help command.
   */
  public String getHelpString();
}
